package app.modules.cloudpivot.service.impl;

import java.util.Arrays;

import com.authine.cloudpivot.platform.notification.IMessageDesigntimeService;
import com.authine.cloudpivot.platform.notification.IMessageMetaData;
import com.authine.cloudpivot.platform.notification.IMessageSetting;
import com.authine.cloudpivot.platform.notification.MessageSettingType;

/**
 * 自定义消息通道
 *
 * @author LiuGangQiang Create in 2024/02/28
 */
public class CustomConfigServiceImpl implements IMessageDesigntimeService {
    private static final IMessageMetaData METADATA;
    private static final IMessageSetting SETTING;

    @Override
    public IMessageMetaData getConfig() {
        return METADATA;
    }

    @Override
    public IMessageSetting getSettingConfig() {
        return SETTING;
    }

    @Override
    public Boolean checkMessageSetting(IMessageSetting iMessageSetting) {
        return true;
    }

    static {
        METADATA = new IMessageMetaData("Custom", "Custom", "自定义消息通道", MessageSettingType.BuildOut);
        SETTING = new IMessageSetting("Custom", Arrays.asList(new IMessageSetting.Parameter("ParamA", "ParamA", "参数A", true,
                false), new IMessageSetting.Parameter("ParamB", "ParamB", "参数B", true, true)));
    }
}
